<template>
  <div class="home">
    <el-card class="welcome-card">
      <template #header>
        <div class="card-header">
          <span>欢迎使用管理系统</span>
        </div>
      </template>
      <div class="content">
        <p>这是一个基于 Vue 3、TypeScript 和 Element Plus 构建的后台管理系统。</p>
        <el-button type="primary" @click="$message.success('点击了按钮')">ElMessage</el-button>
      </div>
    </el-card>
    
    <el-row :gutter="20" class="stats-row">
      <el-col :span="8">
        <el-card class="stat-card">
          <div class="stat-item">
            <h3>用户数</h3>
            <p>12,345</p>
          </div>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card class="stat-card">
          <div class="stat-item">
            <h3>订单数</h3>
            <p>5,678</p>
          </div>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card class="stat-card">
          <div class="stat-item">
            <h3>销售额</h3>
            <p>¥1,234,567</p>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup lang="ts">
// 首页相关的逻辑
</script>

<style scoped lang="scss">
.home {
  .welcome-card {
    margin-bottom: 20px;
    
    .card-header {
      font-weight: bold;
      font-size: 18px;
    }
    
    .content {
      p {
        font-size: 16px;
        margin-bottom: 20px;
      }
    }
  }
  
  .stats-row {
    .stat-card {
      .stat-item {
        text-align: center;
        
        h3 {
          margin: 0 0 10px 0;
          font-size: 16px;
          color: #606266;
        }
        
        p {
          margin: 0;
          font-size: 24px;
          font-weight: bold;
          color: #303133;
        }
      }
    }
  }
}
</style>